import requests
from config import url_cloud,headers_web

class laboratorys:
    def __init__(self):
        self.url = url_cloud
        self.headers = headers_web

    @classmethod
    def post_appointmentdatecapacity(cls,url_cloud:str,params=None,json=None,paramspath=None):
        '''
        summary:根据实验室id、人员id、开始日期和结束日期获取实验室可预约时间段及容量信息
        description:Web端预约选择实验室调用，过滤数据日期包括开始日期和结束日期
        :param url_cloud:
        :param params:
        :param json:
        :param paramspath:
        :return:
        '''
        url = url_cloud + f"/teachinglaboratoryapi/v1/laboratorys/{paramspath}/appointmentdatecapacity"
        r = requests.post(url=url,params=params,json=json)
        return r